jQuery.fn.highlightShare = function(dom,callback) {
    
	var shareDom = dom;
	
	var funGetSelectTxt = function() {   
		var txt = "";   
		if(document.selection) {   
			txt = document.selection.createRange().text;    // IE   
		} else {   
			txt = document.getSelection();   
		}   
		return txt.toString();   
	}; 
	
	shareDom.click(
		function() {   
		var txt = funGetSelectTxt();
			if (txt) {   
				callback(txt);
			}
		}  
	);
	
	this.each(
		function() {
			$(this).mouseup(
				function(e){
					
					e = e || window.event;   
					var txt = funGetSelectTxt(), sh = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0;   
					var left = (e.clientX - 40 < 0) ? e.clientX + 20 : e.clientX - 40, top = (e.clientY - 40 < 0) ? e.clientY + sh + 20 : e.clientY + sh - 40;   
					if (txt != "") {   
						shareDom.show();
						shareDom.css("left", left + "px");
						shareDom.css("top", top + "px");   
					} else {   
						shareDom.hide();   
					}   
				}
			);
		}
	);
}